//
//
//
#include "TradeBlockNetwork.h"

CReqData::CReqData(TAny* pAny, MReqObserver* pObserver, const TDesC8& aPostData)
{
	m_p = pAny;
	m_pObserver = pObserver;
	m_pData	= aPostData.Length() ? aPostData.Alloc() : NULL;
	m_pRespData = NULL;
}

CReqData::~CReqData()
{
	delete 	m_pData;
	delete m_pRespData;
}

HBufC8* CReqData::GetRespData()
{
	return m_pRespData;
}

TBool CReqData::SetResponseData(const TDesC8& aPostData)
{
	if (aPostData.Length() != 0)
	{
		if (m_pRespData != NULL)
		{
			delete m_pRespData;
			m_pRespData = NULL;
		}
		m_pRespData = aPostData.AllocL();
		return ETrue;
	}
	return EFalse;
}

